
#ifndef __SDK_SYSTEM_INFO__INCLUDE__
#define __SDK_SYSTEM_INFO__INCLUDE__

#include "SystemMap.h"

namespace nebula { namespace sdk {

/////////////////////////////////////////////////////////////////////////////
// ISystemMap

ISystemMap*  LockSystemMap   ();
void         UnlockSystemMap (ISystemMap*);

// SystemMapAutoPointer
class SystemMapAutoPointer
{
	ISystemMap *_ptr;

public:
	SystemMapAutoPointer() : _ptr(LockSystemMap())
	{
	}

	~SystemMapAutoPointer()
	{
		UnlockSystemMap(_ptr);
	}

public:
	ISystemMap* operator-> () const
	{
		return _ptr;
	}

	ISystemMap* get() const
	{
		return _ptr;
	}

private:
	SystemMapAutoPointer(const SystemMapAutoPointer &);
	SystemMapAutoPointer& operator = (const SystemMapAutoPointer &);
};

/////////////////////////////////////////////////////////////////////////////

}} //end of nebula::sdk

#endif //__SDK_SYSTEM_INFO__INCLUDE__

